BigDFT.LRTDDFT module
- transition_indexes(np, nalpha, indexes)[source]
Returns the list of the indices in the bigdft convention that correspond to the couple iorb-ialpha with given spin.
- class TransitionMatrix(matrix=None, norb_occ=None, norb_virt=None, log=None)[source]
Matrix of Transition Quantities, might be either
CouplingMatrix
orTransitionMultipoles
- Parameters:
matrix (matrix-like) – data of the coupling matrix. If present also the number of orbitals should be provided.
norb_occ (tuple) – number of occupied orbitals per spin channnel. Compulsory if
matrix
is specified.norb_virt (tuple) – number of empty orbitals per spin channnel. Compulsory if
matrix
is specified.log (Logfile) – Instance of the logfile from which the coupling matrix calculation is performed. Automatically retrieves the
norb_occ
and norb_virt` parameters. Whenlog
parameter is present the parametermatrix
is ignored.
- Raises:
ValueError – if the file of the coupling matrix indicated by
log
does not exists
- class CouplingMatrix(matrix=None, norb_occ=None, norb_virt=None, log=None)[source]
Casida Coupling Matrix, extracted from the calculation performed by BigDFT
- class TransitionMultipoles(matrix=None, norb_occ=None, norb_virt=None, log=None)[source]
Transition dipoles, extracted from the calculation performed by BigDFT
- class TransitionDipoles(matrix=None, norb_occ=None, norb_virt=None, log=None)[source]
Transition dipoles as provided in the version of the code < 1.8.0. Deprecated, to be used in some particular cases
- class Excitations(cm, tm)[source]
LR Excited states of a system
Definition of the excited states in the Casida Formalism
- Parameters:
cm (CouplingMatrix) – the matrix of coupling among transitions
tm (TransitionMultipoles) – scalar product of multipoles among transitions
- spectrum_curves(omega, slice=None, weights=None)[source]
Calculate spectrum curves.
Provide the set of the curves associated to the weights. The resulting curves might then be used to draw the excitation spectra.
- Parameters:
omega (array) – the linspace used for the plotting, of shape
(n,)
. Must be provided in Atomic Unitsslice (array) – the lookup array that has to be considered. if Not provided the entire range is assumed
weights (array) – the set of arrays used to weight the spectra. Must have shape
(rank,m)
, whererank
is equal to the number of eigenvalues. If m is absent it is assumed to be 1. When not specified, it defaults to the average oscillator strenghts.
- Returns:
a set of spectrum curves, of shape equal to
(n,m)
, wheren
is the shape ofomega
andm
the size of the second dimension ofweights
.- Return type:
array
- identify_singlet_and_triplets(tol=1e-05)[source]
- Find the lookup tables that select the singlets and the triplets among
the excitations
- Parameters:
tol (float) – tolerance to be applied to recognise the spin character
- project_on_spin(exc, tol=1e-08)[source]
Control if an excitation has a Singlet or Triplet character
- split_excitations(evals, tol, nexc='all')[source]
Separate the excitations in channels.
This methods classify the excitations according to the channel they belong, and determine if a given excitation might be considered as a belonging to a discrete part of the spectrum or not.
- identify_thresholds(occ_energies, tol, nexc)[source]
Identify the thresholds per excitation.
For each of the first
nexc
excitations, identify the energy value of its corresponding threshold. This value is determined by projecting the excitation components on the occupied states and verifying that their norm for the highest energy level is below a given tolerance.
- determine_occ_energies(evals)[source]
Extract the occupied energy levels from a Logfile BandArray structure, provided the tuple of the number of occupied states
- Parameters:
evals (BandArray) – the eigenvalues as they are provided (for instance) from a Logfile class instance.
- plot_alpha(**kwargs)[source]
Plot the imaginary part.
Plot the real or imaginary part of the dynamical polarizability.
- Keyword Arguments:
- Returns:
the reference to
matplotlib.pyplot
module.- Return type:
matplotlib.pyplot
- lookup(group)[source]
Identify the group of the excitations according to the argument
- Parameters:
group (str) –
A string chosen between
"all"
: provides the entire set of excitations (None
instead of the lookup array)"bt"
: provides only the excitations below threshold"at"
: provides only the excitations above threshold"singlets"
: provides the index of the excitations that have a singlet character"triplets"
: provides the index of the excitations that have a triplet character
- plot_excitation_landscape(**kwargs)[source]
Represent the excitation landscape as splitted in the excitations class
- Parameters:
**kwargs – keyword arguments to be passed to the pyplot instance. The
xlabel
,ylabel
as well asxlim
are already set.- Returns:
- the reference to
matplotlib.pyplot
module.
- the reference to
- Return type:
matplotlib.pyplot
Example
>>> ex=Excitations(cm,tm) >>> ex.split_excitations(evals=...,tol=1.e-4,nexc=...) >>> ex.plot_excitation_landscape(title='Excitation landscape')
- dos_dict(group='all')[source]
Dictionary for DoS creation.
Creates the keyword arguments that have to be passed to the meth:BigDFT.DoS.append method of the DoS class
- dos(group='all', **kwargs)[source]
Density of States of the Excitations.
Provides an instance of the
DoS
class, corresponding to the Excitations instance.
- plot_Sminustwo(coord, alpha_ref=None, group='all')[source]
Inspect S-2 sum rule.
Provides an handle to the plotting of the $S^{-2}$ sum rule, which should provide reference values for the static polarizability tensor.
- Parameters:
- Returns:
reference to
matplotlib.pyplot
module.